package net.wanho.controller;

import lombok.RequiredArgsConstructor;
import net.wanho.dto.UserDTO;
import net.wanho.service.UserService;
import net.wanho.vo.AjaxResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author 
 * @since 2024-12-20
 */
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {

    private final UserService userService;

    @PostMapping("/register")
    public AjaxResult register(@RequestBody UserDTO userDTO){
        userService.register(userDTO);
        return AjaxResult.success();
    }

}
